Create wallet account
The Create wallet account API is utilized to create a wallet account under a specific customer. This process involves utilizing the wallet's legal representative users who are associated with the customer. The created account serves as a dedicated space for managing various digital assets within the wallet system.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
Parameter | Description |
---|---|
Name Mandatory | String Specifies the name of the wallet account. Ex: "SignerTest10381" |
description Mandatory | String Represents an optional field that can contain additional information or details about the wallet account. Ex: "" |
customerID Mandatory | String Refers to the unique identifier of the customer associated with the wallet account. Ex: "100000000041001" |
keyType Mandatory | String Indicates the type of key used for the wallet account. Ex: "MULTISIG" |
primaryAsset Mandatory | String Denotes the primary digital asset associated with the wallet account. Ex: "XLM" |
LegalReps Mandatory | Array |
keyStorage Mandatory | String Indicates the storage method for the representative's key. Ex: "ON_DEVICE" or "HARDWARE_LEDGER" |
ID Mandatory | String Unique identifier for the legal representative. Ex: "994002" |
weightAge Mandatory | Number Specifies the weight or importance of the legal representative in the multisignature setup. Ex: 4 |
assets Mandatory | Array |
threshold Mandatory | Object |
high Mandatory | Number Specifies the high threshold value. Ex: 5 |
medium Mandatory | Number Indicates the medium threshold value. Ex: 4 |
low Mandatory | Number Represents the low threshold value. Ex: 5 |
systemShare Mandatory | Number Represents the system share for the wallet account. Ex: 1 |
- cURL
- C#
- Go
- NodeJs
curl --location '{{url}}/rpc/WalletService/CreateWallet' \
--header 'DiviceID: 8020' \
--header 'Signature: keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic e3tFbWFpbH19Ont7UGFzc3dvcmR9fQ==' \
--data '{"Name":"SignerTest10381","description":"","customerID":"100000000041001","keyType":"MULTISIG","primaryAsset":"XLM","LegalReps":[{"keyStorage":"ON_DEVICE","ID":"994002","weightAge":4}],"assets":["XLM","USDC"],"threshold":{"high":5,"medium":4,"low":3},"systemShare":1}'
var options = new RestClientOptions("{{url}}")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/fednowbackend/rpc/WalletService/CreateWallet", Method.Post);
request.AddHeader("DiviceID", "8020");
request.AddHeader("Signature", "keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Basic e3tFbWFpbH19Ont7UGFzc3dvcmR9fQ==");
var body = @"{" + "\n" +
@" ""Name"": ""SignerTest10381""," + "\n" +
@" ""description"": """"," + "\n" +
@" ""customerID"": ""100000000041001""," + "\n" +
@" ""keyType"": ""MULTISIG""," + "\n" +
@" ""primaryAsset"": ""XLM""," + "\n" +
@" ""LegalReps"": [" + "\n" +
@" {" + "\n" +
@" ""keyStorage"": ""ON_DEVICE""," + "\n" +
@" ""ID"": ""994002""," + "\n" +
@" ""weightAge"": 4" + "\n" +
@" }" + "\n" +
@" ]," + "\n" +
@" ""assets"": [" + "\n" +
@" ""XLM""," + "\n" +
@" ""USDC""" + "\n" +
@" ]," + "\n" +
@" ""threshold"": {" + "\n" +
@" ""high"": 5," + "\n" +
@" ""medium"": 4," + "\n" +
@" ""low"": 3" + "\n" +
@" }," + "\n" +
@" ""systemShare"": 1" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{url}}/rpc/WalletService/CreateWallet"
method := "POST"
payload := strings.NewReader(`{
"Name": "SignerTest10381",
"description": "",
"customerID": "100000000041001",
"keyType": "MULTISIG",
"primaryAsset": "XLM",
"LegalReps": [
{
"keyStorage": "ON_DEVICE",
"ID": "994002",
"weightAge": 4
}
],
"assets": [
"XLM",
"USDC"
],
"threshold": {
"high": 5,
"medium": 4,
"low": 3
},
"systemShare": 1
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("DiviceID", "8020")
req.Header.Add("Signature", "keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic e3tFbWFpbH19Ont7UGFzc3dvcmR9fQ==")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{url}}',
'path': '/fednowbackend/rpc/WalletService/CreateWallet',
'headers': {
'DiviceID': '8020',
'Signature': 'keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=',
'Content-Type': 'application/json',
'Authorization': 'Basic e3tFbWFpbH19Ont7UGFzc3dvcmR9fQ=='
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"Name": "SignerTest10381",
"description": "",
"customerID": "100000000041001",
"keyType": "MULTISIG",
"primaryAsset": "XLM",
"LegalReps": [
{
"keyStorage": "ON_DEVICE",
"ID": "994002",
"weightAge": 4
}
],
"assets": [
"XLM",
"USDC"
],
"threshold": {
"high": 5,
"medium": 4,
"low": 3
},
"systemShare": 1
});
req.write(postData);
req.end();
Body
{
"Name": "SignerTest10381",
"description": "",
"customerID": "100000000041001",
"keyType": "MULTISIG",
"primaryAsset": "XLM",
"LegalReps": [
{
"keyStorage": "ON_DEVICE",
"ID": "994002",
"weightAge": 4
}
],
"assets": [
"XLM",
"USDC"
],
"threshold": {
"high": 5,
"medium": 4,
"low": 3
},
"systemShare": 1
}
Response: 200
Response Parameters
Parameter | Description |
---|---|
id | String Represents the unique identifier for the account. Ex: "1126001" |
name | String Specifies the name of the account. Ex: "SignerTest10381" |
number | String Indicates the account number. Ex: "9991126002" |
createdDate | String Represents the date and time of the account creation. Ex: "2023-06-26T12:47:29.595703472+05:30" |
updatedDate | String Indicates the date and time of the last update made to the account. Ex: "0001-01-01T00:00:00Z" |
balance | Number Represents the current balance of the account. Ex: 0 |
debit | Boolean Specifies whether the account allows debits or not. Ex: false |
minimumBalance | Number Represents the minimum required balance for the account. Ex: 0 |
holdBalance | Number Indicates the amount of balance that is on hold. Ex: 0 |
subLedgerCode | String Represents the sub-ledger code associated with the account. Ex: "" |
customerID | String Refers to the unique identifier of the customer associated with the account. Ex: "100000000041001" |
accountType | String Indicates the type of account. Ex: "WALLET" |
legalReps | Array |
ID | String Unique identifier for the legal representative. Ex: "994002" |
name | String Specifies the name of the legal representative. Ex: "ChennaReddy" |
createdDate | String Represents the date and time of the representative's creation. Ex: "0001-01-01T00:00:00Z" |
updatedDate | String Indicates the date and time of the last update made to the representative's information. Ex: "0001-01-01T00:00:00Z" |
contact | Object |
String Represents the email address of the representative. Ex: "chennareddy.s+1@netxd.com" | |
phoneNumber | String Specifies the phone number of the representative. Ex: "9087493944" |
weightAge | Number Specifies the weight or importance of the legal representative in the multisignature setup. Ex: 4 |
keyStorage | String Indicates the storage method for the representative's key. Ex: "ON_DEVICE" |
keyStatus | String Represents the status of the representative's key generation. Ex: "PENDING_KEY_GENERATION" |
status | String Represents the current status of the account. Ex: "PENDING_APPROVAL" |
isVerify | Boolean Specifies whether the account is verified or not. Ex: false |
minimumRouteApprovers | Number Indicates the minimum number of route approvers required for the account. Ex: 0 |
newRouteAlert | Boolean Specifies whether there is an alert for a new route. Ex: false |
ledgerBalance | Number Represents the balance as per the ledger. Ex: 0 |
custodialCustomerId | String Refers to the unique identifier of the custodial customer associated with the account. Ex: "100000000041001" |
preAuthBalance | Number Indicates the pre-authorized balance. Ex: 0 |
assets | Array |
accountFinderSync | Boolean Specifies whether the account finder sync is enabled or not. Ex: false |
isGLVerify | Boolean Indicates whether the account is verified for General Ledger (GL) purposes. Ex: false |
threshold | Object |
high | Number Specifies the high threshold value. Ex: 5 |
medium | Number Indicates the medium threshold value, Ex: 4 |
low | Number Represents the low threshold value. Ex: 3 |
systemShare | Number Represents the system share for the account. Ex: 1 |
primaryAsset | String Denotes the primary digital asset associated with the account. Ex: "XLM" |
keyType | String Indicates the type of key used for the account. Ex: "MULTISIG" |
{
"id": "1126001",
"name": "SignerTest10381",
"number": "9991126002",
"createdDate": "2023-06-26T12:47:29.595703472+05:30",
"updatedDate": "0001-01-01T00:00:00Z",
"balance": 0,
"debit": false,
"minimumBalance": 0,
"holdBalance": 0,
"subLedgerCode": "",
"customerID": "100000000041001",
"accountType": "WALLET",
"legalReps": [
{
"ID": "994002",
"name": "ChennaReddy",
"createdDate": "0001-01-01T00:00:00Z",
"updatedDate": "0001-01-01T00:00:00Z",
"contact": {
"email": "chennareddy.s+1@netxd.com",
"phoneNumber": "9087493944"
},
"weightAge": 4,
"keyStorage": "ON_DEVICE",
"keyStatus": "PENDING_KEY_GENERATION"
}
],
"status": "PENDING_APPROVAL",
"isVerify": false,
"minimumRouteApprovers": 0,
"newRouteAlert": false,
"ledgerBalance": 0,
"custodialCustomerId": "100000000041001",
"preAuthBalance": 0,
"assets": [
"XLM",
"USDC"
],
"accountFinderSync": false,
"isGLVerify": false,
"threshold": {
"high": 5,
"medium": 4,
"low": 3
},
"systemShare": 1,
"primaryAsset": "XLM",
"keyType": "MULTISIG"
}